package com.lightheart.sphr.xiaobinggan.customswitch.ui

import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import com.github.chengang.library.OnCheckedChangeListener
import com.github.chengang.library.TickAnimatorListener.TickAnimatorListenerAdapter
import com.github.chengang.library.TickView
import com.lightheart.sphr.xiaobinggan.R
import kotlinx.android.synthetic.main.activity_switch.*

class SwitchActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_switch)

        tick_view.config.setOnCheckedChangeListener { tickView, isCheck -> }.setTickAnimatorListener(object : TickAnimatorListenerAdapter() {
        })

        check_btn.setOnClickListener {
            tick_view.isChecked = true
            tick_view_accent.isChecked = true
        }

        uncheck_btn.setOnClickListener {
            tick_view.isChecked = false
            tick_view_accent.isChecked = false
        }
    }
}